package com.hkyp.ss.course.provider.model;


import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;


/**
 * 字典表
 *
 */
@Data
@Entity
@DynamicUpdate
@DynamicInsert
@Table(
        indexes = {
                @Index(columnList = "status",name = "statusIndex")
                   //常做查询条件的列加索引

        }
)
public class Dictionary   {

    private static final long serialVersionUID = 102L;

    /**
     * id
     * 自增主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 字典编号
     */
    private String dicCode;

    /**
     * 字典名称
     */
    private String dicName;

    /**
     * 字典类型
     */
    private Integer dicType = 10;

    /**
     * 创建时间
     */
    @Column(name = "create_at")
    private Long createAt;

    /**
     * 更新时间
     */
    @Column(name = "update_at")
    private Long updateAt;

    /**
     *  具体值参考状态枚举
     */
    @Column(columnDefinition = "tinyint")
    private Integer status = 10;

}


